/*
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-06-01 15:40:23
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-06-01 15:40:49
 * @FilePath: \app\src\views\el\svgIcons\requireIcons.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

const req = require.context('@/assets/icons/svg', false, /\.svg$/)

const requireAll = requireContext => requireContext.keys()

const re = /\.\/(.*)\.svg/

/* 获取所有的svg文件名数组 */
const icons = requireAll(req).map(i => {
  return i.match(re)[1]// match() 方法可在字符串内检索指定的值
})

export default icons
